<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>maogai添加</title>
<link rel="stylesheet"
	href="${pageContext.request.contextPath }/layui/css/layui.css"
	media="all">
<script src="${pageContext.request.contextPath }/layui/layui.js"></script>
</head>
<body>
	<br>
    <h1 align="center">添加</h1>
	<form class="layui-form"
		action="${pageContext.request.contextPath }/maogai/insert" method="post">
		<div class="layui-form-item">
			<label class="layui-form-label">编号:</label>
			<div class="layui-input-block">
				<input type="text" name="id"  
					 placeholder="请输入编号 "
					autocomplete="off" class="layui-input">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">题目:</label>
			<div class="layui-input-block">
				<input type="text" name="topic"  
					 placeholder="请输入题目 "
					autocomplete="off" class="layui-input">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">选项:</label>
			<div class="layui-input-block">
				<input type="text" name="topic_ans"  
					 placeholder="请输入选项 "
					autocomplete="off" class="layui-input">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">答案:</label>
			<div class="layui-input-block">
				<input type="text" name="answer"  
					 placeholder="请输入答案 "
					autocomplete="off" class="layui-input">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">分数:</label>
			<div class="layui-input-block">
				<input type="text" name="grad"  
					 placeholder="请输入等级 "
					autocomplete="off" class="layui-input">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">是否多选:</label>
			<div class="layui-input-block">
				<input type="text" name="multiple"  
					 placeholder="请输入是否多选 "
					autocomplete="off" class="layui-input">
			</div>
		</div>
		<div class="layui-form-item">
			<div class="layui-input-block">
				<button class="layui-btn" lay-submit lay-filter="formDemo">提交</button>
				<button type="reset" class="layui-btn layui-btn-primary">重置</button>
			</div>
		</div>
	</form>

	<script>
		//Demo
		layui.use(['form','laydate'], function() {
			var laydate = layui.laydate;
			var form = layui.form;
			form.on('submit(formDemo)', function(data) {
				//layer.msg(JSON.stringify(data.field));
				return true;
			});
		});
	</script>

</body>
</html>